package com.zs.controller;

import com.zs.model.criteria.BaseCriteria;
import com.zs.service.CallHistoryService;
import com.zs.service.EngineerService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 运维工程师概况
 */
@Controller
@RequestMapping("/callHistory")
public class CallHistoryController {


    @Resource
    private CallHistoryService callHistoryService;

    @RequestMapping(value = "list", method = RequestMethod.POST)
    @ResponseBody
    public String selectEngineerList(HttpServletRequest request,
                                    @RequestParam(value = "pn", required = true, defaultValue = "1") Integer pageNo,
                                    @RequestParam(value = "ps", required = true, defaultValue = "3") Integer pageSize
    ) {
        BaseCriteria baseCriteria = new BaseCriteria();
        baseCriteria.setPageNo(pageNo);
        baseCriteria.setPageSize(pageSize);
        return callHistoryService.selectCallHistoryList(baseCriteria);
    }
    

    
}
